package com.lcc.generate;

import com.lcc.generate.clazz.ClassUtils;
import com.lcc.generate.jsp.JspUtil;
import com.lcc.generate.mapper.MapperUtilsPG;
import com.lcc.generate.util.DruidPool;
import com.lcc.generate.util.MyField;
import com.lcc.generate.vue3.Vue3Util;
import com.lcc.generate.vue3.Vue3V3Util;

import java.util.List;

/**
 * @author lcc
 * @date 2024/12/9 11:15
 */
public class GenerateMain {

    public static void main(String[] args) throws Exception {
        String model = "";
        if (args.length > 0) {
            model = args[0];
        }
        Config config = Config.getConfig(model);
        DruidPool.init(config);
        List<List<MyField>> lists = ClassUtils.generate(config);
        MapperUtilsPG.generate(lists, config);
        Vue3Util.generate(lists, config);
        Vue3V3Util.generate(lists, config);
        JspUtil.generate(lists, config);
    }

}
